import Login from './components/framework/uum/user/Login.vue'
import Forget from './components/framework/uum/user/forgetPwd.vue'
import Change from './components/framework/uum/user/changePwd.vue'
import NotFound from './components/404.vue'
import Home from './components/Home.vue'

//framework
import CodeModel from './components/framework/code/list.vue'
import DataModel from './components/framework/datamodel/list.vue'
import UnitList from './components/framework/unit/list.vue'
import DictList from './components/framework/dict/list.vue'
import Setting from './components/framework/setting/setting.vue'

//uum
import UserList from './components/framework/uum/user/list.vue';
import RoleList from './components/framework/uum/role/list.vue'
import OrganList from './components/framework/uum/organ/list.vue'
import MenuList from './components/framework/uum/menu/list.vue'
import Infor from './components/framework/uum/user/infor.vue'

/**
 * meta参数解析
 * hideLeft: 是否隐藏左侧菜单，单页菜单为true
 * module: 菜单所属模块
 * menu: 所属菜单，用于判断三级菜单是否显示高亮，如菜单列表、添加菜单、编辑菜单都是'menu'，用户列表、添加用户、编辑用户都是'user'，如此类推
 */
const routes = [
  {
    path: '/login',
    component: Login,
    name: '',
    hidden: true
  },
  {
    path: '/404',
    component: NotFound,
    name: '',
    hidden: true
  },
	{ path: '/', component: Login, name: 'Login' },           // 登录页面
  { path: '/Forget', component: Forget, name: 'Forget' },   // 忘记密码
  {
    path :'/home',
    component : Home,
    children : [
        { path: 'sys/change', component: Change , name: 'change', meta: { hideLeft: false, module: 'mModule', menu: '/home/sys/change' }},
        { path: 'sys/setting', component: Setting , name: 'setting', meta: { hideLeft: false, module: 'mModule', menu: '/home/sys/setting' }},
        
    ],
  },
  //uum
  {
    path :'/home',
    component : Home,
    children : [
        { path: 'uum/user/list', component: UserList, name: 'userlist', meta: { hideLeft: false, module: 'mModule', menu: '/home/uum/user/list' }},
        { path: 'uum/role/list', component: RoleList, name: 'rolelist', meta: { hideLeft: false, module: 'mModule', menu: '/home/uum/role/list' }},
        { path: 'uum/organ/list', component: OrganList, name: 'organlist', meta: { hideLeft: false, module: 'mModule', menu: '/home/uum/organ/list' }},
        { path: 'uum/menu/list', component: MenuList, name: 'menulist', meta: { hideLeft: false, module: 'mModule', menu: '/home/uum/menu/list' }},
        { path: 'uum/user/infor', component: Infor, name: 'infor', meta: { hideLeft: false, module: 'mModule', menu: '/home/uum/user/list' }},
    ],
  },
  //framework
  {
    path :'/home',
    component : Home,
    children : [
        { path: 'codemodel/list', component: CodeModel, name: 'codemodel', meta: { hideLeft: false, module: 'mModule', menu: '/home/codemodel/list' }},
        { path: 'datamodel/list', component: DataModel, name: 'datamodel', meta: { hideLeft: false, module: 'mModule', menu: '/home/datamodel/list' }},
        { path: 'unit/list', component: UnitList, name: 'unitlist', meta: { hideLeft: false, module: 'mModule', menu: '/home/unit/list' }},
        { path: 'dict/list', component: DictList , name: 'dictlist', meta: { hideLeft: false, module: 'mModule', menu: '/home/dict/list' }},
    ],
  },
 
  
  {
    path: '*',
    hidden: true,
    redirect: { path: '/404' }
  }
  
]
export default routes
